HP Operations Manager for Windows

com.hp.openview.ib.api.jopc
Class JOpcObject


java.lang.Object
  |
  +--com.hp.openview.ib.api.jopc.JOpcObject
All Implemented Interfaces:
java.lang.Cloneable, JOpcApiDefinition
Direct Known Subclasses:
JOpcMessage, JOpcMonValue

public abstract class JOpcObject
extends java.lang.Object
implements java.lang.Cloneable, JOpcApiDefinition

base class of opc objects. Supports generic behavior and attribute getting and setting.


Constructor Summary
protected JOpcObject(int aOpcDataType)
           
 
Method Summary
protected  long addListElement(int aAttrType)
          Native API description:
Adds an element of the correct type to the specified list in the opcdata structure.
 java.lang.Object clone()
          Creates and returns a copy of this object.
protected  long deleteListElement(int aAttrType, long aIndex)
          Native API description:
Deletes an element of the specified list in the opcdata structure.
 boolean equals(java.lang.Object aObj)
          Indicates whether some other object is "equal to" this one.
protected  void finalize()
          as fallback, to avoid memory leak in native adapter/API layer in case of non released JOpcObjects
protected  long getListLength(int aAttrType)
          Returns the number of elements in an embedded list of a HPOM opcdata structure.
protected  long getLong(int aAttrType)
          Returns the value of the numeric attribute
protected  java.lang.String getString(int aAttrType)
          Returns the desired string value.
protected  java.lang.String getString(int aAttrType, int aElmType, long aIndex)
           
protected  void setDouble(int aAttrType, double aAttrValue)
          sets the numeric float attribute
protected  void setLong(int aAttrType, long aAttrValue)
          Sets the numeric long attribute.
protected  void setString(int aAttrType, java.lang.String aName)
          Sets the desired string value.
protected  void setString(int aAttrType, java.lang.String aValue, int aElmType, long aIndex)
           
 void terminate()
          release resources in native adapter/API layer allocated while object construction (JOpcObject and derived classes).
 java.lang.String toString()
          Returns a string representation of all get-methods including method()-name and value.
protected  void type()
          Native API description:
Returns the opcdata type in data.
static java.lang.String version()
          Returns the what string of the HPOM library that is used in this version.
 

Constructor Detail

JOpcObject

protected JOpcObject(int aOpcDataType)
			throws JOpcException
Method Detail

version

public static java.lang.String version()
								throws JOpcException
Returns the what string of the HPOM library that is used in this version.
Returns:
the what string / version
Throws:
JOpcException - if native method return != OPC_ERR_OK. or if a field contains an improper value, the exception reason is a positive value corresponding to the JOpcApiDefinition interface identifying the attribute name of the native API data structure.

getString

protected java.lang.String getString(int aAttrType)
							throws JOpcException
Returns the desired string value.

Native API description:
Instead of a status value, the function opcdata_get_str() returns a pointer to the desired string value. This function can, therefore, be used directly in another function call.

Parameters:
aAttrType - attribute that is queried
Returns:
the desired string
Throws:
JOpcException - if native method return != OPC_ERR_OK. or if a field contains an improper value, the exception reason is a positive value corresponding to the JOpcApiDefinition interface identifying the attribute name of the native API data structure.

setString

protected void setString(int aAttrType,
						 java.lang.String aName)
				throws JOpcException
Sets the desired string value.
Parameters:
aAttrType - attribute to be set
aName - value to be set
Throws:
JOpcException - if native method return != OPC_ERR_OK. or if a field contains an improper value, the exception reason is a positive value corresponding to the JOpcApiDefinition interface identifying the attribute name of the native API data structure.

type

protected void type()
			 throws JOpcException
Native API description:
Returns the opcdata type in data.
Throws:
JOpcException - if native method return != OPC_ERR_OK.
  JOpcException reasons (negative values):
  OPC_ERR_INVALID_INPARAM: data is invalid; probably NULL
 
or if a field contains an improper value, the exception reason is a positive value corresponding to the JOpcApiDefinition interface identifying the attribute name of the native API data structure.

getLong

protected long getLong(int aAttrType)
				throws JOpcException
Returns the value of the numeric attribute
Parameters:
aAttrType - attribute that is queried
Returns:
the long value
Throws:
JOpcException - if native method return == -1.
  JOpcException reasons (negative values):
  if the routine fails, a value of -1 is returned.
 

setLong

protected void setLong(int aAttrType,
					 long aAttrValue)
				throws JOpcException
Sets the numeric long attribute.
Parameters:
aAttrType - attribute to be set
aAttrValue - value to be set
Throws:
JOpcException - if native method return != OPC_ERR_OK.
  JOpcException reasons (negative values):
  OPC_ERR_INVALID_INPARAM: data is NULL, attribute is invalid
 
or if a field contains an improper value, the exception reason is a positive value corresponding to the JOpcApiDefinition interface identifying the attribute name of the native API data structure.

setDouble

protected void setDouble(int aAttrType,
						 double aAttrValue)
				throws JOpcException
sets the numeric float attribute
Parameters:
aAttrType - attribute to be set
aAttrValue - value to be set
Throws:
JOpcException - if native method return != OPC_ERR_OK.
  JOpcException reasons (negative values):
  OPC_ERR_INVALID_INPARAM: data is NULL,
						 attribute is NULL,
						 value is NULL
 
or if a field contains an improper value, the exception reason is a positive value corresponding to the JOpcApiDefinition interface identifying the attribute name of the native API data structure.

getString

protected java.lang.String getString(int aAttrType,
									 int aElmType,
									 long aIndex)
							throws JOpcException

setString

protected void setString(int aAttrType,
						 java.lang.String aValue,
						 int aElmType,
						 long aIndex)
				throws JOpcException

getListLength

protected long getListLength(int aAttrType)
					throws JOpcException
Returns the number of elements in an embedded list of a HPOM opcdata structure.
Parameters:
aAttrType - Specifies the list in the data structure.
Returns:
number of elements in the list
Throws:
JOpcException - if native method return < OPC_ERR_OK.
  JOpcException reasons (negative values):
  OPC_ERR_INVALID_INPARAM: parameter data is invalid;
						 probably NULL list is invalid
 
or if a field contains an improper value, the exception reason is a positive value corresponding to the JOpcApiDefinition interface identifying the attribute name of the native API data structure.

addListElement

protected long addListElement(int aAttrType)
					 throws JOpcException
Native API description:
Adds an element of the correct type to the specified list in the opcdata structure. The element type is specified with the list. After adding the element, the new length of the list will be returned.
Parameters:
aAttrType - Specifies the list in the data structure.
Returns:
new length of the list
Throws:
JOpcException - if native method return < OPC_ERR_OK.
  JOpcException reasons (negative values):
  OPC_ERR_INVALID_INPARAM: Input parameter was not valid ( < 0 )
 
or if a field contains an improper value, the exception reason is a positive value corresponding to the JOpcApiDefinition interface identifying the attribute name of the native API data structure.

deleteListElement

protected long deleteListElement(int aAttrType,
								 long aIndex)
						throws JOpcException
Native API description:
Deletes an element of the specified list in the opcdata structure. This function returns the new number of elements in the list.
Parameters:
aAttrType - Specifies the list in the data structure.
aIndex - Specifies the element in the list.
Returns:
the new number of elements in the list.
Throws:
JOpcException - if native method return < OPC_ERR_OK.
  JOpcException reasons (negative values):
  OPC_ERR_INVALID_INPARAM: parameter data is invalid;
						 probably NULL
						 list or index is invalid
 
or if a field contains an improper value, the exception reason is a positive value corresponding to the JOpcApiDefinition interface identifying the attribute name of the native API data structure.

terminate

public void terminate()
release resources in native adapter/API layer allocated while object construction (JOpcObject and derived classes).

finalize

protected void finalize()
as fallback, to avoid memory leak in native adapter/API layer in case of non released JOpcObjects
Overrides:
finalize in class java.lang.Object

equals

public boolean equals(java.lang.Object aObj)
Indicates whether some other object is "equal to" this one.
Overrides:
equals in class java.lang.Object
Parameters:
aObj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

clone

public java.lang.Object clone()
					 throws java.lang.CloneNotSupportedException
Creates and returns a copy of this object. Native API description:
The API creates a copy of the data area and returns it in copy. It creates a complete copy, that is, the string fields of data are copied and not shared between data and copy. The allocated memory has to be deallocated using opcdata_free() before using this function. This function cannot be used to copy a data area of type OPCDTYPE_CONTAINER. If it is necessary to copy a whole container, the application must do this using iterator and container functions.
Overrides:
clone in class java.lang.Object
Returns:
a clone of this instance.
Throws:
java.lang.CloneNotSupportedException - if the object's class does not support the Cloneable interface. or if a field contains an improper value, the exception reason is a positive value corresponding to the JOpcApiDefinition interface identifying the attribute name of the native API data structure.

toString

public java.lang.String toString()
Returns a string representation of all get-methods including method()-name and value. The format of the returned string is <method-name> = <value>; separated by a new line (\n).
 
 Further / detailed requirements:
 - method name has to start with get
 - method must not have a parameter
 - method must have return type String or Long
 - method must not be static
 
Overrides:
toString in class java.lang.Object
Returns:
a string of all get-methods

 

500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@systemmanager.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.